/**
 * hnjz.com Inc.
 * Copyright (c) 2004-2013 All Rights Reserved.
 */
package com.hnjz;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import com.hnjz.common.upload.FileUpDownUtil;

/**
 * 对应sys.properties中的配置项
 * 
 * @author wumi
 * @version $Id: Sys.java, v 0.1 Feb 18, 2013 10:40:12 AM wumi Exp $
 */
@Component("sys")
public class Sys implements InitializingBean {

    /**日志*/
    private static final Log log = LogFactory.getLog(Sys.class);

    public static String     SJURL;

    @Value("#{settings['FILEPATH']}")
    public String            filePath;

    @Value("#{settings['SJURL']}")
    public String            sjUrl;

    @Override
    public void afterPropertiesSet() throws Exception {
        FileUpDownUtil.path = filePath;
        SJURL = sjUrl;
        if (log.isDebugEnabled()) {
            log.debug("filePath:" + filePath);
            log.debug("sjUrl:" + sjUrl);
        }
    }

}
